const Router = require('koa-router')
const router = new Router({ prefix: '/auth' })
const AuthenticationController = require('../../controller/authentication')

router.post('/login', AuthenticationController.login)

router.post('/refreshToken', async (ctx, next) => {
  ctx.body = { code: 200, data: '/refreshToken' }
  await next()
})

router.get('/getUserInfo', AuthenticationController.getProfile)

module.exports = router
